﻿using System;
using System.Collections.Generic;
using System.Text;
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Security.Cryptography;

/// <summary>
/// Summary description for NhaPhanPhoiBUS
/// </summary>
public class NhaPhanPhoiBUS
{
    private NhaPhanPhoiDAO objNhaPhanPhoiDAO;
    public NhaPhanPhoiBUS(string strPath)
    {
        objNhaPhanPhoiDAO = new NhaPhanPhoiDAO(strPath);
    }
    public DataSet SelectNhaPhanPhoiAll()
    {
        DataSet ds;
        try
        {
            ds = objNhaPhanPhoiDAO.SelectNhaPhanPhoiAll();
            return ds;
        }
        catch (System.Exception e)
        {
            throw new Exception(e.Message, e.InnerException);
        }
    }

    public Boolean InsertNhaPhanPhoi(NhaPhanPhoiDTO npp)
    {
        try
        {
            return objNhaPhanPhoiDAO.InsertNhaPhanPhoi(npp);
        }
        catch (System.Exception e)
        {
            return false;
        }
    }

    public Boolean UpdateNhaPhanPhoi(NhaPhanPhoiDTO npp)
    {
        try
        {
            return objNhaPhanPhoiDAO.UpdateNhaPhanPhoi(npp);
        }
        catch (System.Exception e)
        {
            return false;
        }
    }

    public Boolean DeleteNhaPhanPhoi(int id)
    {
        try
        {
            return objNhaPhanPhoiDAO.DeleteNhaPhanPhoi(id);
        }
        catch (System.Exception e)
        {
            return false;
        }
    }

}